package com.nuonuo.refresh.config;

import java.util.Map;

import com.nuonuo.middleware.drs.spring.context.annotation.DrsConfigurationProperties;
import com.nuonuo.middleware.drs.spring.core.env.PropertyType;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @ClassName ShareDomainConfig
 * @Description: TODO
 * @Author fengxiaodong
 * @Date 2022/1/10
 **/
@Component
@DrsConfigurationProperties(prefix = "jiezi.share", groupId = "jiezi-storage-gateway",
    dataId = "application.yml", dataType =  PropertyType.YML)
public class ShareDomainConfig {

  private Map<String, String> gateway;

  public static final String OUT_HOST = "outHost";
  public static final String IN_HOST = "inHost";

  public String getValue(String key) {
    return gateway.get(key);
  }

  public String getDefaultValue() {
    return gateway.get("default");
  }

  public void setGateway(Map<String, String> gateway) {
    this.gateway = gateway;
  }
}
